package com.sparrow.manage.user;

import com.sparrow.manage.common.service.impl.BaseServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends BaseServiceImpl<User, String> implements UserService {

    private static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);

    @Autowired
    private UserDao userDao;

    @Override
    protected JpaRepository<User, String> getDao() {
        return this.userDao;
    }

    @Override
    public User queryByLoginname(String loginname) {
        return userDao.findByLoginname(loginname);
    }

}
